

package com.hazelcast.internal.metrics.impl;

import com.hazelcast.internal.metrics.MetricDescriptor;

import java.util.function.Supplier;

/**
 * Default {@link MetricDescriptor} {@link Supplier} creating new instance
 * on every call to {@link #get()}.
 */
public class DefaultMetricDescriptorSupplier implements Supplier<MetricDescriptorImpl> {
    public static final Supplier<MetricDescriptorImpl> DEFAULT_DESCRIPTOR_SUPPLIER = new DefaultMetricDescriptorSupplier();

    @Override
    public MetricDescriptorImpl get() {
        return new MetricDescriptorImpl(this);
    }
}
